Floating point and decimal numbers are not nearly as well-behaved as integers, and you cannot assume that floating point calculations that "should" have integer or exact results actually do. 浮点数和小数不象整数一样“循规蹈矩”,不能假定浮点计算一定产生整型或精确的结果,虽然它们的确“应该”那样做。
Floating point is a very similar concept, except that computers use binary rather than decimal as their base. 浮点是一个非常类似的概念,除了计算机使用二进制而不是十进制作为基础。
One takes a double-precision floating point as input, another takes an integer and a scale factor, and another takes a String representation of a decimal number. 其中一个构造函数以双精度浮点数作为输入,另一个以整数和换算因子作为输入,还有一个以小数的String表示作为输入。
Using floating point and decimal numbers in Java programs is fraught with pitfalls. 在Java程序中使用浮点数和小数充满着陷阱。
So a floating point value again is a number with a decimal point, so it depends. 一个浮点型数据就是一个,带小数点的数。
Real Programmers scorn floating point arithmetic. The decimal point was invented for pansy bedwetters who are unable to think big. 真正的程序员鄙视浮点运算。十进制是为蠢人而发明的。